from copy import copy

from Common import Fession_mini
webKey51 = {'0':['*'],'1':['初中'],'2':['初中','高中','中技','中专'],'3':['初中','高中','中技','中专','大专'],
              '4':['初中','高中','中技','中专','大专','本科'],'5':['初中','高中','中技','中专','大专','本科','硕士'],
              '6':['初中','高中','中技','中专','大专','本科','硕士','博士']}
webKey51_2 = {'10':"",'11':'初中','12':'中专','13':'大专','14':'本科','15':'本科','16':'硕士',
              '20':"",'21':'无','22':'3', '23': '5','24':"10", '25': '10'}

localKey51 ={'education':'Academic','experience':'Work_Experience'}


def getNewKey(key):

    if localKey51[key] is not None:
        return localKey51[key]
    else:
        return None


def directSearch(value):
    pass
def changeKey(dict):
    print('changeKey',dict)
    nowCondition = {}
    for i in dict:
        tempList = []
        tempGet = Fession_mini.getFessionMini('selectJob')
        print(type(dict[i]))
        if type(dict[i]) == type("1"):
            for j in dict[i].split('-')[:-1]:
                tempList.append(webKey51_2[str(j)])

            tempGet[localKey51[i]] =  tempList
            del tempGet[i]
            Fession_mini.setFessionMini('selectJob',tempGet)
    print('zheshisha',Fession_mini.getFessionMini('selectJob'))
        # print(i, dict[i][:-1].split('-'))
    # newkey = getNewKey(key)
    # newValue = value.split('-')